package mm.util;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class UnicodeConverter {
	
	public static void main(String[] args) throws IOException {
		while(true){
			String in = "";
			char[] buffer=new char[1024];
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			for(int flag=0; (flag=br.read(buffer))>-1; ){
				String line = new String(buffer, 0, flag);
				line = line.substring(0, line.length()-2);
				if("bye".equals(line)||line.endsWith("\r\nbye")){
					System.exit(0);
				}else if("/".equals(line)||line.endsWith("\r\n/")){
					in += "/".equals(line)?"":line.substring(0, line.length()-3);
					StringBuffer sb=new StringBuffer();
					for(int i=0; i<in.length(); i++){
						char c=in.charAt(i);
						if(c>127){
							sb.append("\\u"+Integer.toHexString(c));
						}else{
							sb.append(c);
						}
					}
					System.out.println(sb);
					in = "";
				}else{
					in += line;
				}
			}
			System.out.println(in);
		}
	}

}
